/*
 * @Description: 
 * @Author: linzejian
 * @Date: 2021-07-15 10:38:23
 * @LastEditTime: 2021-10-25 14:26:44
 * @LastEditors: 
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '@/views/index.vue'

Vue.use(VueRouter)

const routes = [
  // {
  //   path: '/',
  //   name: 'index',
  //   component: Index,
  // },
  {
    path: '',
    component: (resolve) => require(['@/views/test'], resolve),
    children: [{
      path: '/test',
      component: ()=> import ('@/views/test'),
      name: '首页',
      meta: {
        title: '测试',
        icon: 'dashboard',
        noCache: true,
        affix: true
      }
    }]
  }
]

const router = new VueRouter({
  mode: 'history',
  // 本地运行路由前缀
  base: process.env.BASE_URL,
  routes
})

export default router
